SquareGrid

A 2d grid that is rectangle in nature

Constructors

this
this(U width, U height)

Creates the grid given the size

Alias This

this_

Members

Functions

in_bounds
bool in_bounds(T id)

* Is a given position within the grid * * Params: * id = The position * * Returns: * If the position is within the grid

neighbors
string[] neighbors(T id)

* Get a set edge, neighbors * * Params: * id = The id of the edge * * Returns: * The neighbor edges or null if id doesn't exist

passable
bool passable(T id)

* Is a given position blocked by a wall * * Params: * id = The position * * Returns: * If the position is blocked by a wall

Variables

this_
Graph this_;
Undocumented in source.

Parameters

T

A point type with x and y fields

U

The type of x and y

Meta